package com.example.demo.utils;

import com.example.demo.payload.DataResponse;

public class CommonMethod {
    public static DataResponse getReturnData(Object obj, String msg){
        return new   DataResponse(0,obj,msg);
    }
    public static  DataResponse getReturnData(Object obj){
        return getReturnData(obj,null);
    }
    public static  DataResponse getReturnData(Integer code, Object obj, String msg){
        return new   DataResponse(code,obj,msg);
    }
    public static DataResponse getReturnMessageOK(String msg){
        return getReturnMessage(0, msg);
    }
    public static DataResponse getReturnMessage(Integer code, String msg){
        return new   DataResponse(code,null,msg);
    }
}
